home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / bye < prev    next >
Internet Message Format  |  1995-03-31  |  3KB

  1. From helens!shelby!rutgers!orstcs!jacobs.CS.ORST.EDU!smithj Mon May 14 13:16:39 PDT 1990
  2. Status: RO
  3.  
  4. Article 1621 of comp.sys.handhelds:
  5. Path: helens!shelby!rutgers!orstcs!jacobs.CS.ORST.EDU!smithj
  6. >From: smithj@jacobs.CS.ORST.EDU (Jeremy Smith)
  7. Newsgroups: comp.sys.handhelds
  8. Subject: Byeeeeeeeeeeeee..........(HP 48 BYE program)
  9. Keywords: hp 48sx hp48sx bye optomize program
  10. Message-ID: <18227@orstcs.CS.ORST.EDU>
  11. Date: 14 May 90 18:34:14 GMT
  12. Sender: usenet@orstcs.CS.ORST.EDU
  13. Organization: Oregon State University - CS - Corvallis
  14. Lines: 46
  15.  
  16.  
  17.         This program, called BYE, is run just before I turn the
  18. calculator off.  Its purpose is to clean up as much junk
  19. (internal and external) as possible, when you are not using the
  20. calculator (usually the case if you're just switching the machine
  21. off), so that it's rearing to go when switched on again.  I would
  22. welcome any additions to its functionality.
  23.  
  24.         I have assigned BYE to the off key (and leave USER mode on);
  25. when the machine is switched off the current version takes about
  26. a second to run.  From the beeps I can tell it doesn't even make
  27. it into the case before it's done running and the machine is
  28. actually off.  I would expect future, more comprehensive,
  29. versions to take considerably longer.
  30.  
  31. Checksum:       # 55900d
  32. Bytes:          84.5
  33.  
  34. %%HP: T(3)A(D)F(.);
  35. \<< 3040 .01 BEEP           @ start of program
  36. CLOSEIO                     @ conserve power
  37. RCLKEYS 0 DELKEYS STOKEYS   @ optimize memory used by key assignments
  38. MEM CLEAR                   @ invoke garbage collection, and clear stack
  39. 1520 .01 BEEP               @ end of program
  40. OFF                         @ turn calculator off                                           
  41. \>>
  42.  
  43. Program notes:
  44.  
  45. 1.      I don't know if garbage collection is better done after the
  46.         stack is clear, in which case MEM CLEAR should be replaced
  47.         by CLEAR MEM DROP.
  48.  
  49. 2.      A lot of programs create variables which could be cleaned
  50.         out after a session.  For instance, plot creates PPAR EQ and
  51.         whatever the independant variable is (usually X), and using
  52.         I/O creates IOPAR.  BYE could traverse the directory tree
  53.         seeking out and destroying all occurrences of such
  54.         variables.  It would assume that if you were interested in
  55.         keeping any of them you would have consciously done so under
  56.         alternative names.
  57.  
  58. #INCLUDE<fancy.signature>
  59. #INCLUDE<std.excuses>
  60. #INCLUDE<std.disclaimers>
  61. #INCLUDE<std.includes>
  62.  
  63.  
  64.